package com.efuture.mutlithread;

/**
 * @ClassNAME ThreadSleepTest
 * @Description 演示线程sleep方法
 * @Author zhaoshanshan
 * @Date 2021/9/9 11:50 下午
 * @Version 1.0
 */
public class ThreadSleepTest {

    public static void main(String[] args) {
        for (int i = 0;i<10;i++){ //每隔一秒执行一次
            System.out.println(i);
            try {
                Thread.sleep(1000);//单位毫秒
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}